feat: add dotnet 10 support#328
Conversation
Co-authored-by: Thomas Clegg <t@clegg.dev>
# Conflicts: # .github/workflows/run_performance_tests_windows.yml # csharp/PhoneNumbers.Extensions.Test/PhoneNumbers.Extensions.Test.csproj
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #328 +/- ##
=======================================
Coverage 97.94% 97.94%
=======================================
Files 40 40
Lines 52924 52924
Branches 1115 1115
=======================================
Hits 51839 51839
Misses 851 851
Partials 234 234 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| - name: Run benchmarks (main branch) | ||
| if: github.event_name == 'pull_request' | ||
| run: dotnet run -c Release --framework net9.0 -- --filter "*" | ||
| run: dotnet run -c Release --framework net10.0 -- --filter "*" |
There was a problem hiding this comment.
Do we want to just merge this PR as is even though the CI is failing? It's just because net10 doesn't exist on main yet, which it will once this is merged. Or can do it as a two step process and leave this as net9.
There was a problem hiding this comment.
@twcclegg yeah sure happy to merge it as is, i wasn't 100% sure whether appveyor will build successfully on the next run which is why i left it in draft previously
good to merge whenever you are happy with the changes
There was a problem hiding this comment.
Pull request overview
This PR updates the C# solution’s target frameworks and CI configuration to build/test/benchmark using .NET 10, extending the existing multi-targeting setup (netstandard2.0 + modern .NET TFMs) to include net10.0.
Changes:
- Add
net10.0to the library, extensions, tests, and performance test TFMs, and extend nullable-enable conditions to includenet10.0. - Move the build-time
PhoneNumbers.MetadataBuilderproject tonet10.0and update consuming projects to execute thenet10.0build output. - Update GitHub Actions and AppVeyor to install/use .NET 10, and update benchmark/test invocations to target
net10.0.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| csharp/PhoneNumbers/PhoneNumbers.csproj | Adds net10.0 TFM; updates nullable condition and MetadataBuilder DLL path. |
| csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj | Adds net10.0 TFM; updates nullable condition and MetadataBuilder DLL path. |
| csharp/PhoneNumbers.PerformanceTest/PhoneNumbers.PerformanceTest.csproj | Adds net10.0 TFM; updates nullable condition for modern TFMs. |
| csharp/PhoneNumbers.MetadataBuilder/PhoneNumbers.MetadataBuilder.csproj | Updates MetadataBuilder to target net10.0. |
| csharp/PhoneNumbers.Extensions/PhoneNumbers.Extensions.csproj | Adds net10.0 TFM. |
| csharp/PhoneNumbers.Extensions.Test/PhoneNumbers.Extensions.Test.csproj | Adds net10.0 TFM; updates nullable condition. |
| appveyor.yml | Installs .NET 10 via dotnet-install.ps1 before building/testing. |
| .github/workflows/run_performance_tests_windows.yml | Uses .NET 10 and runs benchmarks under net10.0. |
| .github/workflows/run_all_tests_and_upload_code_coverage.yml | Uses .NET 10 for test + coverage run. |
| .github/workflows/codeql.yml | Uses .NET 10 for CodeQL build environment. |
| .github/workflows/build_and_run_unit_tests_linux.yml | Uses .NET 10 and runs tests targeting net10.0 only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes